package com.edu.bean;

import java.util.List;

/*
    一对多：
*       嵌套结果
*           在 1的一方 里 体现 多的一方的存在(由于是多个 所以用 List<XXXX>  )


    一对多：
        嵌套查询
              在 1的一方 里 体现 多的一方的存在(由于是多个 所以用 List<XXXX> XXX  )
*
* */
public class Grade {

    private int gradeId;

    private String gradeName;

    private String gradeTeacher;

    private List<Student> studentList;

    public List<Student> getStudentList() {
        return studentList;
    }

    public void setStudentList(List<Student> studentList) {

        this.studentList = studentList;
    }

    public int getGradeId() {
        return gradeId;
    }

    public void setGradeId(int gradeId) {
        this.gradeId = gradeId;
    }

    public String getGradeName() {
        return gradeName;
    }

    public void setGradeName(String gradeName) {
        this.gradeName = gradeName;
    }

    public String getGradeTeacher() {
        return gradeTeacher;
    }

    public void setGradeTeacher(String gradeTeacher) {
        this.gradeTeacher = gradeTeacher;
    }

    @Override
    public String toString() {
        return "Grade{" +
                "gradeId=" + gradeId +
                ", gradeName='" + gradeName + '\'' +
                ", gradeTeacher='" + gradeTeacher + '\'' +
                '}';
    }
}
